﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" 
CodeFile="frmImportData.aspx.vb" Inherits="Administrator_frmImportData" %>

<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxUploadControl" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
            <script type="text/javascript">


     $(document).ready(function () {
         Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
         $("input[id$=txtDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
             yearAddToDisplay: 543,
             dateFormat: 'dd/mm/yy',
             showOn: "button",
             buttonImage: "../img/calendar.gif",
             buttonImageOnly: true
         }));
         function EndRequestHandler(sender, args) {
             $("input[id$=txtDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                 yearAddToDisplay: 543,
                 dateFormat: 'dd/mm/yy',
                 showOn: "button",
                 buttonImage: "../img/calendar.gif",
                 buttonImageOnly: true
             }));
         }

     });

     
     var hasSubmitted = 0;
     function NoDoubleSubmit() {
         var divMsg = document.getElementById('Processing');
         if (hasSubmitted == 0) {
             hasSubmitted = 0;
             divMsg.style.display = 'block';

             return true;
         }

         return false;
     }

     function NoDoubleSubmit2() {
         var divMsg = document.getElementById('Processing2');
            
             divMsg.style.display = 'block';
             document.getElementById("<%=hdfButton.ClientID%>").click();
     }

     var prm = Sys.WebForms.PageRequestManager.getInstance();

     prm.add_initializeRequest(InitializeRequest);
     prm.add_endRequest(EndRequest);

     function InitializeRequest(sender, args) {
         $get('ContentPlaceHolder1_UpdatePanel2').style.cursor = 'wait';
     }

     function EndRequest(sender, args) {
         $get('ContentPlaceHolder1_UpdatePanel2').style.cursor = 'auto';
     }
     
     function Confirm() {
         if (confirm($("input[id$=hdfmsg]").val()) == true)
         {
             $("input[id$=hdfUpload0]").val("AAA");          
          }
     }

    
     // ---------------------------------

        </script>
   
      <table class="control" style="width:100%;">
                <tr>
                    <td align="right" width="150">
                        ประเภท :
                    </td>
                    <td align="left" style="height: 26px; ">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <table style="width:100%;">
                                    <tr>
                                        <td style="width: 231px">
                                            <asp:DropDownList ID="ddlList" runat="server" CssClass="control" Height="25px" 
                                                Width="214px" AutoPostBack="True">
                                                <asp:ListItem></asp:ListItem>
                                                <asp:ListItem Value="1">ปปง</asp:ListItem>
                                                <asp:ListItem Value="2">ปปส</asp:ListItem>
                                                <asp:ListItem Value="3">ปปช</asp:ListItem>
                                                <asp:ListItem Value="4">DSI</asp:ListItem>
                                                <asp:ListItem Value="5">EU</asp:ListItem>
                                                <asp:ListItem Value="6">OFACT</asp:ListItem>
                                                <asp:ListItem Value="7">UN</asp:ListItem>
                                                <asp:ListItem Value="8">Other</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                            &nbsp;</td>
                                    </tr>
                                </table>

                                <asp:Button ID="btnTestScript" runat="server"  CssClass="control"  Text="Button_TEST" />
                                <asp:Button ID="btnhid" runat="server"  CssClass="control" Visible="false" Text="Button"/>
                                <asp:HiddenField ID="hdfUpload0" runat="server" />
                                
                                <asp:HiddenField ID="hdfmsg" runat="server" />
                                <asp:HiddenField ID="hdfSanctionCode" runat="server" />
                                <asp:HiddenField ID="hdfSanctionTypeCode" runat="server" />
                                <asp:HiddenField ID="hdfSanctionFileType" runat="server" />
                               
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        ไฟล์ :
                    </td>
                    <td align="left">
                        <input id="FileUpload1" runat="Server" class="control" 
                            style="width: 220px" type="file" />
                        <asp:TextBox ID="TxtPathFileUpload" runat="server" Enabled="False" 
                            Visible="False" Width="335px"></asp:TextBox>
                        &nbsp;<asp:HiddenField ID="hdfUpload" runat="server" />
                    </td>
                </tr>
                                <tr style="display: none">
                    <td align="right">
                        วันที่ :
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtDate" runat="server" CssClass="control" Height="20px" 
                            Width="160px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        จำนวนข้อมูล :</td>
                    <td align="left">
                        <asp:Label ID="lblCountRow" runat="server" Height="20px"></asp:Label>
                        <asp:HiddenField ID="hdfCountRow" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        &nbsp;</td>
                    <td align="left">
                        <asp:Button ID="btnTestUpload" runat="server" CssClass="control" 
                            Text="Upload" Width="91px" />
                        
                        &nbsp;<asp:Button ID="btnUpload" runat="server" CssClass="control" Text="อัพโหลด" 
                            Width="80px" Visible="false"/>
                        &nbsp;<asp:Button ID="btnDelete" runat="server" CssClass="control" Text="ลบข้อมูล" Visible="false"
                            Width="80px" />
                        &nbsp;<asp:Button ID="btnCancel" runat="server" CssClass="control" Text="ยกเลิก" 
                            Width="80px" />
                             <asp:Button ID="hdfButton" runat="server"  
                            Width="23px"  Height="10px" style="display:none"/>
                                            </td>
                </tr>
                <tr>
                    <td align="right" colspan="2">
                    
                                            <span id="Processing" style="display: none">
                            <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
                            กรุณารอสักครู่ ระบบกำลังทำงาน... </span>
                                        
                                        
                                
                          
                </td>
                </tr>
                <tr>
                    <td align="right" colspan="2">
                    
                                            <span id="Processing2" style="display: none">
                            <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
                            กรุณารอสักครู่ ระบบกำลังทำงาน... </span>
                </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
            <asp:GridView ID="grdAmlList" runat="server" 
                AutoGenerateColumns="False" CellPadding="4" CssClass="control" 
                ForeColor="#333333" Width="100%" AllowPaging="true" PageSize="10">
                <FooterStyle BackColor="White" Font-Bold="True" ForeColor="#333333" />
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <PagerSettings Mode="NumericFirstLast" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
                <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Navy" />
                <HeaderStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                   <%-- <asp:BoundField DataField="uniqueid" HeaderText="เลขที่บัตร">
                    <ItemStyle Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FirstName" HeaderText="ชื่อ" >
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="LastName" HeaderText="นามสกุล">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DataSource" HeaderText="แหล่งที่มา">
                    <ItemStyle HorizontalAlign="Left" Width="80px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="risklevel" HeaderText="ระดับความเสี่ยง" 
                        SortExpression="risklevel">
                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                    </asp:BoundField>--%>
                     <asp:BoundField DataField="entID" HeaderText="รหัสประจำข้อมูล">
                    <ItemStyle Width="120px" />
                    </asp:BoundField>
                     <asp:BoundField DataField="uniqueid" HeaderText="เลขที่บัตร">
                    <ItemStyle Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FirstNameEng" HeaderText="ชื่อ" >
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MiddleNameEng" HeaderText="ชื่อกลาง">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                     <asp:BoundField DataField="LastNameEng" HeaderText="นามสกุล">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FirstName" HeaderText="ชื่อภาษาท้องถิ่น" >
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MiddleName" HeaderText="ชื่อกลางภาษาท้องถิ่น">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                     <asp:BoundField DataField="LastName" HeaderText="นามสกุลภาษาท้องถิ่น">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                      <asp:BoundField DataField="EntityNameEng" HeaderText="ชื่อบริษัท">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                     <asp:BoundField DataField="EntityName" HeaderText="ชื่อบริษัทภาษาท้องถิ่น">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DataSource" HeaderText="แหล่งที่มา">
                    <ItemStyle HorizontalAlign="Left" Width="80px" />
                    </asp:BoundField>
                 
                </Columns>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="2">
                        &nbsp;</td>
                </tr>
            </table>
             
             
</asp:Content>

